package com.qding.park.adapter.ark.adapter.enums;

public enum RespCodeEnums {
    
    SUCCESS("成功", "000"),
    FAIL("失败", "999");

    /** 枚举值 */
    private String value;
    /** 描述 */
    private String desc;

    private RespCodeEnums(String desc, String value) {
        this.value = value;
        this.desc = desc;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static RespCodeEnums getEnum(String value) {
        RespCodeEnums resultEnum = null;
        RespCodeEnums[] enumAry = RespCodeEnums.values();
        for (int i = 0; i < enumAry.length; i++) {
            if (enumAry[i].getValue().equals(value)) {
                resultEnum = enumAry[i];
                break;
            }
        }
        return resultEnum;
    }

}
